module.exports = function(sequelize, DataTypes) {
  var UserGroup = sequelize.define(
    'UserGroup',
    {
      id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true
      },
      role: {
        type: DataTypes.ENUM('admin', 'user', 'father', 'mather')
      },
      name: {
        type: DataTypes.STRING(50)
      },
      relateId: {
        type: DataTypes.INTEGER
      }
    },
    {
      tableName: 'user_group',
      comments: '用户-群组连接表'
    }
  )

  return UserGroup
}
